/**
*  \file mon.c
*
*  \brief  mon parameter.
*
*  \author   paragen.py
*  \author   Michael J. Hohmann <michael.hohmann@linde-mh.de>
*
*
*/

/*===============================================[ private includes  ]================================================*/
#include "mon.h"
#include <stddef.h>
#include "../cfg/mon_cfg.h"

/*===============================================[ private defines   ]================================================*/
#ifndef MON_FINGERPRINT_0x54B424E80252803618383289D55E5B12
#error /* header has wrong version */
#endif
/*===============================================[ private datatypes ]================================================*/

/* entries: 34   */ 
struct mon_parameter_info
{
   struct paragen_type_u32_mm switches_current;
   struct paragen_type_s16_mm tempmotinv1;
   struct paragen_type_s16_mm tempmotinv2;
   struct paragen_type_u16_mm ext5vsupply;
   struct paragen_type_u16_mm ext13vsupply;
   struct paragen_type_u16_mm dclinkvolts;
   struct paragen_type_u16_mm accelerator1;
   struct paragen_type_u16_mm accelerator2;
   struct paragen_type_u16_mm steeranga;
   struct paragen_type_u16_mm steerangb;
   struct paragen_type_u16_mm reserver1volts;
   struct paragen_type_u16_mm reserver2volts;
   struct paragen_type_u16_mm cutoffisocurrent;
   struct paragen_type_u16_mm maincntcurrent;
   struct paragen_type_u16_mm keyswitch;
   struct paragen_type_s16_mm encoderspeed;
   struct paragen_type_u32_mm switches_outputs;
   struct paragen_type_u8_mm maincntpwm;
   struct paragen_type_u8_mm isocufoffpwm;
   struct paragen_type_u16_mm ext12vsupply;
   struct paragen_type_u8_mm pump_motor_rpm;
   struct paragen_type_u32_mm component_work_time;
   struct paragen_type_u32_mm driver_present_time;
   struct paragen_type_u32_mm fan1_open_time;
   struct paragen_type_u32_mm fan2_open_time;
   struct paragen_type_u32_mm forward_switch_time;
   struct paragen_type_u32_mm neutral_switch_time;
   struct paragen_type_u32_mm reverse_switch_time;
   struct paragen_type_u32_mm traction_forward_time;
   struct paragen_type_u32_mm traction_reverse_time;
   struct paragen_type_u32_mm lift_switch_time;
   struct paragen_type_u32_mm tilt_switch_time;
   struct paragen_type_u32_mm aux1_switch_time;
   struct paragen_type_u32_mm aux2_switch_time;
}; 

/*===============================================[ private variables ]================================================*/

/* Mon-parameter needs no default_parameter */
static const struct mon_parameter_info mon_info=
{
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, switches_current), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_s16_mm, offsetof(struct mon_parameter, tempmotinv1), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_s16_mm, offsetof(struct mon_parameter, tempmotinv2), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u16_mm, offsetof(struct mon_parameter, ext5vsupply), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u16_mm, offsetof(struct mon_parameter, ext13vsupply), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u16_mm, offsetof(struct mon_parameter, dclinkvolts), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u16_mm, offsetof(struct mon_parameter, accelerator1), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u16_mm, offsetof(struct mon_parameter, accelerator2), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u16_mm, offsetof(struct mon_parameter, steeranga), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u16_mm, offsetof(struct mon_parameter, steerangb), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u16_mm, offsetof(struct mon_parameter, reserver1volts), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u16_mm, offsetof(struct mon_parameter, reserver2volts), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u16_mm, offsetof(struct mon_parameter, cutoffisocurrent), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u16_mm, offsetof(struct mon_parameter, maincntcurrent), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u16_mm, offsetof(struct mon_parameter, keyswitch), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_s16_mm, offsetof(struct mon_parameter, encoderspeed), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, switches_outputs), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u8_mm, offsetof(struct mon_parameter, maincntpwm), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u8_mm, offsetof(struct mon_parameter, isocufoffpwm), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u16_mm, offsetof(struct mon_parameter, ext12vsupply), U32_CONST(0x00000003),U32_CONST(0x00000009) }, 0, 0,1 },
   { { paragen_type_u8_mm, offsetof(struct mon_parameter, pump_motor_rpm), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, component_work_time), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, driver_present_time), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, fan1_open_time), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, fan2_open_time), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, forward_switch_time), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, neutral_switch_time), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, reverse_switch_time), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, traction_forward_time), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, traction_reverse_time), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, lift_switch_time), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, tilt_switch_time), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, aux1_switch_time), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 },
   { { paragen_type_u32_mm, offsetof(struct mon_parameter, aux2_switch_time), U32_CONST(0x00000003),U32_CONST(0x00000000) }, 0, 0,1 }
};

static const struct paragen_index  mon_index[]=
{
   { 0x00000BB8, (struct paragen_type_header*) &mon_info.switches_current },
   { 0x00000BB9, (struct paragen_type_header*) &mon_info.tempmotinv1 },
   { 0x00000BBA, (struct paragen_type_header*) &mon_info.tempmotinv2 },
   { 0x00000BBB, (struct paragen_type_header*) &mon_info.ext5vsupply },
   { 0x00000BBC, (struct paragen_type_header*) &mon_info.ext13vsupply },
   { 0x00000BBD, (struct paragen_type_header*) &mon_info.dclinkvolts },
   { 0x00000BBE, (struct paragen_type_header*) &mon_info.accelerator1 },
   { 0x00000BBF, (struct paragen_type_header*) &mon_info.accelerator2 },
   { 0x00000BC0, (struct paragen_type_header*) &mon_info.steeranga },
   { 0x00000BC1, (struct paragen_type_header*) &mon_info.steerangb },
   { 0x00000BC2, (struct paragen_type_header*) &mon_info.reserver1volts },
   { 0x00000BC3, (struct paragen_type_header*) &mon_info.reserver2volts },
   { 0x00000BC4, (struct paragen_type_header*) &mon_info.cutoffisocurrent },
   { 0x00000BC5, (struct paragen_type_header*) &mon_info.maincntcurrent },
   { 0x00000BC6, (struct paragen_type_header*) &mon_info.keyswitch },
   { 0x00000BC7, (struct paragen_type_header*) &mon_info.encoderspeed },
   { 0x00000BC8, (struct paragen_type_header*) &mon_info.switches_outputs },
   { 0x00000BC9, (struct paragen_type_header*) &mon_info.maincntpwm },
   { 0x00000BCA, (struct paragen_type_header*) &mon_info.isocufoffpwm },
   { 0x00000BCB, (struct paragen_type_header*) &mon_info.ext12vsupply },
   { 0x00000BCC, (struct paragen_type_header*) &mon_info.pump_motor_rpm },
   { 0x00000BCD, (struct paragen_type_header*) &mon_info.component_work_time },
   { 0x00000BCE, (struct paragen_type_header*) &mon_info.driver_present_time },
   { 0x00000BCF, (struct paragen_type_header*) &mon_info.fan1_open_time },
   { 0x00000BD0, (struct paragen_type_header*) &mon_info.fan2_open_time },
   { 0x00000BD1, (struct paragen_type_header*) &mon_info.forward_switch_time },
   { 0x00000BD2, (struct paragen_type_header*) &mon_info.neutral_switch_time },
   { 0x00000BD3, (struct paragen_type_header*) &mon_info.reverse_switch_time },
   { 0x00000BD4, (struct paragen_type_header*) &mon_info.traction_forward_time },
   { 0x00000BD5, (struct paragen_type_header*) &mon_info.traction_reverse_time },
   { 0x00000BD6, (struct paragen_type_header*) &mon_info.lift_switch_time },
   { 0x00000BD7, (struct paragen_type_header*) &mon_info.tilt_switch_time },
   { 0x00000BD8, (struct paragen_type_header*) &mon_info.aux1_switch_time },
   { 0x00000BD9, (struct paragen_type_header*) &mon_info.aux2_switch_time }
};

struct mon_parameter mon_parameter_ram;

/*===============================================[ public variables  ]================================================*/

/** Parameter pointer
*  Pointer to read the Parameter from application
*/
struct mon_parameter const * const mon = &mon_parameter_ram;

const struct paragen_object mon_obj =
{
   0,
   (void*) &mon_parameter_ram,
   0,
   mon_index,
   (struct paragen_type_header *) &mon_info,
   0,
   0,
   sizeof mon_index /sizeof(struct paragen_index ),
   {0x54,0xB4,0x24,0xE8,0x02,0x52,0x80,0x36,0x18,0x38,0x32,0x89,0xD5,0x5E,0x5B,0x12} /* finger print */ 
};

/*===============================================[ private functions ]================================================*/

/*====================================================================================================================*/


/***********************************************************************************************************************
*                             Copyright 2020 Linde Material Handling. All rights reserved.                             *
***********************************************************************************************************************/
